<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    {% include 'link_css.html' %}
    {% include 'head_script.html' %}
</head>
<body>
<div class="content-wrapper">


    <section class="content">

<div id="dialog">
        <div class="box box-info">
            <!-- /.box-header -->
            <!-- form start -->
            <form class="form-horizontal" action="{% url 'idc_save' %}" method="POST">
                      {% csrf_token %}
                <div class="box-body">
                <div class="form-group">
                  <label for="name" class="col-sm-2 control-label">机房名称:</label>

                  <div class="col-sm-10">
                    <input type="text" class="form-control" name="name" value="{{ obj.name }}">
                  </div>
                </div>
                <div class="form-group">
                  <label for="address" class="col-sm-2 control-label">机房地址:</label>

                  <div class="col-sm-10">
                    <input type="text" class="form-control" name="address" value="{{ obj.address }}">
                  </div>
                </div>
                <div class="form-group">
                  <label for="tel" class="col-sm-2 control-label">机房电话:</label>

                  <div class="col-sm-10">
                    <input type="text" class="form-control" name="tel" value="{{ obj.tel }}">
                  </div>
                </div>
                <div class="form-group">
                  <label for="contact" class="col-sm-2 control-label">客户经理:</label>

                  <div class="col-sm-10">
                    <input type="text" class="form-control" name="contact" value="{{ obj.contact }}">
                  </div>
                </div>
                <div class="form-group">
                  <label for="contact_phone" class="col-sm-2 control-label">移动电话:</label>

                  <div class="col-sm-10">
                    <input type="text" class="form-control" name="contact_phone" value="{{ obj.contact_phone }}">
                  </div>
                </div>
                <div class="form-group">
                  <label for="jigui" class="col-sm-2 control-label">机柜信息:</label>

                  <div class="col-sm-10">
                    <input type="text" class="form-control" name="jigui" value="{{ obj.jigui }}">
                  </div>
                </div>
                <div class="form-group">
                  <label for="ip_range" class="col-sm-2 control-label">IP范围:</label>

                  <div class="col-sm-10">
                    <input type="text" class="form-control" name="ip_range" value="{{ obj.ip_range }}">
                  </div>
                </div>
                <div class="form-group">
                  <label for="bandwidth" class="col-sm-2 control-label">接入带宽:</label>

                  <div class="col-sm-10">
                    <input type="text" class="form-control" name="bandwidth" value="{{ obj.bandwidth }}">
                  </div>
                </div>
                <input type="hidden" name="id" value="{{ obj.id }}">
              </div>
              <!-- /.box-body -->
              <div class="box-footer">
                <button type="submit" class="btn btn-info pull-right">保存</button>
              </div>
              <!-- /.box-footer -->
            </form>
</div>
    </div>


    </section>

  </div>
{#回传参数至父层#}
<script type="text/javascript">
        var index = parent.layer.getFrameIndex(window.name);
        var success = {{ status }};
        if ( success == '1' ) {
            parent.$("#handle_status").val('1');
              parent.layer.close(index);
        } else if( success == '2' ) {
            parent.$("#handle_status").val('2');
            parent.layer.close(index);
        }
</script>
</body>
</html>